package cn.itcast.Exception;

/**
 * @Author : 叶荻风
 * @create : 2024/8/6 14:20
 */
public class Example {
    private static Exception staticException = new Exception("Static exception");

    public static void method1() throws Exception {
        throw new Exception("Static exception");
    }

    public static void method2() {
        try {
            method1();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        method2();
    }
}